home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / browser / Example.asc < prev    next >
Text File  |  1998-06-24  |  1KB  |  65 lines

  1. '
  2. ' Demonstration source file - It does nothing useful, except prove 
  3. ' that the AMOS Pro Browser works (at least, some of the time!)
  4. '
  5.  
  6. Global GL1,GL2#,GL3$
  7.  
  8. GL2#=GL1
  9. GL3$="String: GL1 + GL2#"
  10. 'GL2#=GL2#+1.5 
  11.  
  12. LTM=3 : Rem LTM is local to the 'main' routine 
  13.  
  14. _PROC_1
  15. _PROC_2[GL1]
  16. _PROC_3[5]
  17. _PROC_4
  18.  
  19. End 
  20.  
  21. LTM2=3 : Rem This is also local the 'main' routine  
  22.  
  23. Procedure _PROC_1
  24.    Shared LTM
  25.    ' Uses the LTM variable from the 'main' routine
  26.    LTM=5
  27.    
  28.    _PROC_3[4]
  29.    _PROC_4
  30. End Proc
  31.  
  32.  
  33. Procedure _PROC_2[NUM]
  34.    GL1=12 : Rem This is the global variable
  35.    LTM=RT+4 : Rem LTM is local (a different var to the one in main and PROC_1) 
  36. End Proc[RT]
  37.  
  38.  
  39. Procedure _PROC_3[REC]
  40.    If REC=0
  41.       Print "Finished!"
  42.    Else 
  43.       Print REC
  44.       _PROC_3[REC-1]
  45.    End If 
  46. End Proc
  47.  
  48.  
  49. Procedure _PROC_4
  50.    P=12
  51.    
  52.    If P=5 : Rem In this case P=5 is not an assignment  
  53.       P=6
  54.    End If 
  55.    
  56.    Dim AR(P)
  57.    
  58.    Inc AR(3) : Rem The browser will indicate when *any* element of the array changes
  59.    
  60. End Proc
  61.  
  62.  
  63.  
  64.  
  65.